synchronous generator construction and working principle